home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_10
/
allison
/
arglist3.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-09-06
|
591b
|
36 lines
LISTING 17
#include <stddef.h>
#include <cstring.h>
#include <classlib/arrays.h>
class Arglist
{
public:
Arglist(size_t, char **);
size_t count() const;
const string& operator[](size_t) const;
private:
enum {CHUNK = 10};
TArrayAsVector<string> args;
void expand(char *);
void add(char *);
};
inline size_t Arglist::count() const
{
return args.GetItemsInContainer();
}
inline const string& Arglist::operator[](size_t i) const
{
return args[i];
}
inline void Arglist::add(char *arg)
{
args.Add(string(arg));
}